The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.
Messaging is a communication model that is used to handle the complexity of communications between multiple entities in one or more computer systems. In the context of computer systems, the term “message” may refer to any item that includes data of any data type or format. For example, a database application for a Database Management System (DBMS) may submit a request for data in the form of a message to a database server and the request is stored in a message queue of the DBMS. Furthermore, messages may be stored persistently, may be propagated between queues on different nodes of a distributed DBMS, and may be transmitted over a network.
Messages may be instantiations of events, such as a business event or IT event. Business events are events explicitly generated and/or consumed by applications. Some examples of business events may be: customer transactions, bank orders, and stock transactions. IT events indicate changes in a database state. Some examples of IT events include a customer order resulting in a database update or a price change being captured automatically from a database update.
As used herein, the terms “message queue” and “queue” refer to a message queue implemented in a volatile memory, such as a Random Access Memory (RAM). The volatile memory may be a shared volatile memory that is accessible by a plurality of processes. A message queue may also be used in conjunction with a storage space in non-volatile permanent store for storing messages from the queue, such as, for example, a database, a table in a database, a file system, or a file in a file system. Message queues used in conjunction with storage space in permanent store are typically used as a communication mechanism by information systems that require a high quality of messaging service, such as, for example, guaranteed delivery of messages even in the event of an information system crash or failure.
As described herein, messages may be published and consumed from any number of separate nodes. These nodes may be part of a database cluster with a shared disk architecture that runs on multiple machines, attached through a cluster interconnect and a shared storage subsystem. Nodes of the cluster may be on different machines, but the cluster appears to be a single database to a client. If the publisher(s) and/or subscriber(s) of messages are on different nodes, then the messages need to be transported over a network, in the case of non-persistent queues, or saved to a common storage medium and copied on another node, in the case of persistent queues.
If a client connects to a node that does not own the message queue utilized by the user, then all messages and events generated by the service must be promulgated to the node to which the user has connected. This incurs significant overhead in both nonpersistent and persistent messaging systems.
In a system that has multiple publishers and multiple consumers, and in which messages may be transferred from some queues to other queues, the specific techniques used to propagate messages in the system can have a significant impact on the performance in areas such as recoverability and memory usage. Therefore it is desirable to provide mechanisms for efficiently managing the queues, the propagation of messages, and the resources involved in propagating the messages.